<template>
    <div class="demo">
        <h2>学校名称: {{name}}</h2>  
        <h2>学校地址: {{addr}}</h2>    
        <button @click='change'>修改地址为上海</button>
    </div>
</template>

<script>
export default {
    name: 'School',
    data(){
        return {
            'name': '清华',
            'addr': '北京'
        }
    },
    methods: {
        change: function() {
            this.addr = '上海'
        }
    }
}
</script>

<style>
    .demo{
        background-color: orange;
    }
</style>